 $(window).load(function(){  
             $(".loading").fadeOut()
            })  
			
/****/
$(document).ready(function(){
	var whei=$(window).width()
	$("html").css({fontSize:whei/20})
	$(window).resize(function(){
		var whei=$(window).width()
	 $("html").css({fontSize:whei/20})
});
	});
	
$(function () {
    echarts_1();
	echarts_2();
    function echarts_1() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('echart1'));

        option = {
            tooltip: {
                trigger: 'axis',
				
                axisPointer: {
                    lineStyle: {
                        color: '#dddc6b'
                    }
                }
            },
            legend: {
                top: '2%',
                data: ['10m风速','50m风速','70m风速'],
                textStyle: {
                    color: 'rgba(255,255,255,.5)',
                    fontSize: 12,
                }
            },
            grid: {
                left: '10',
                top: '30',
                right: '10',
                bottom: '10',
                containLabel: true
            },

            xAxis: [{
                type: 'category',
                boundaryGap: false,
                axisLabel: {
                    textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize: 12,
                    },
                },
                axisLine: {
                    lineStyle: {
                        color: 'rgba(255,255,255,.2)'
                    }

                },

                data: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '11', '12']

            }, {

                axisPointer: { show: false },
                axisLine: { show: false },
                position: 'bottom',
                offset: 20,
            }],

            yAxis: [{
                type: 'value',
                axisTick: { show: false },
                axisLine: {
                    lineStyle: {
                        color: 'rgba(255,255,255,.1)'
                    }
                },
                axisLabel: {
                    textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize: 12,
                    },
                },

                splitLine: {
                    lineStyle: {
                        color: 'rgba(255,255,255,.1)'
                    }
                }
            }],
            series: [{
                name: '10m风速',
                type: 'line',
                smooth: true,
                symbol: 'circle',
                symbolSize: 5,
                showSymbol: false,
                lineStyle: {

                    normal: {
                        color: '#0184d5',
                        width: 2
                    }
                },
                areaStyle: {
                    normal: {
                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                            offset: 0,
                            color: 'rgba(1, 132, 213, 0.4)'
                        }, {
                            offset: 0.8,
                            color: 'rgba(1, 132, 213, 0.1)'
                        }], false),
                        shadowColor: 'rgba(0, 0, 0, 0.1)',
                    }
                },
                itemStyle: {
                    normal: {
                        color: '#0184d5',
                        borderColor: 'rgba(221, 220, 107, .1)',
                        borderWidth: 12
                    }
                },
                data: [5, 4, 3, 4, 3, 4, 3, 6, 2, 4, 2, 4]

            },
            {
                name: '50m风速',
                type: 'line',
                smooth: true,
                symbol: 'circle',
                symbolSize: 5,
                showSymbol: false,
                lineStyle: {

                    normal: {
                        color: '#00d887',
                        width: 2
                    }
                },
                areaStyle: {
                    normal: {
                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                            offset: 0,
                            color: 'rgba(0, 216, 135, 0.4)'
                        }, {
                            offset: 0.8,
                            color: 'rgba(0, 216, 135, 0.1)'
                        }], false),
                        shadowColor: 'rgba(0, 0, 0, 0.1)',
                    }
                },
                itemStyle: {
                    normal: {
                        color: '#00d887',
                        borderColor: 'rgba(221, 220, 107, .1)',
                        borderWidth: 12
                    }
                },
                data: [5, 3, 5, 6, 1, 5, 3, 5, 6, 4, 6, 4]

            },
            {
                name: '70m风速',
                type: 'line',
                smooth: true,
                symbol: 'circle',
                symbolSize: 5,
                showSymbol: false,
                lineStyle: {

                    normal: {
                        color: '#232529',
                        width: 2
                    }
                },
                areaStyle: {
                    normal: {
                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                            offset: 0,
                            color: 'rgba(0, 216, 135, 0.4)'
                        }, {
                            offset: 0.8,
                            color: 'rgba(0, 216, 135, 0.1)'
                        }], false),
                        shadowColor: 'rgba(0, 0, 0, 0.1)',
                    }
                },
                itemStyle: {
                    normal: {
                        color: '#232529',
                        borderColor: 'rgba(221, 220, 107, .1)',
                        borderWidth: 12
                    }
                },
                data: [3, 7, 4, 6, 5, 9, 2, 1, 3, 7, 9]

            },

            ]

        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }
	function echarts_2() {
		   
		  var myChart = echarts.init(document.getElementById('echart2'));
		  
		  // 配置图表的选项和数据
		  var option = {
		    title: {
		      // text: '双直方图示例',
		      textStyle: {
		        color: '#999'
		      }
		    },
		    tooltip: {
		      backgroundColor: 'rgba(0,0,0,0.7)',
		      textStyle: {
		        color: 'rgba(255,255,255,.7)',
		        fontSize: 12
		      }
		    },
		    legend: {
		      data:['倾斜辐射', '直接辐射','总辐射'],
		      textStyle: {
		        color: 'rgba(255,255,255,.5)'
		      }
		    },
		    xAxis: {
		      // data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月', '10月', '11月', '12月'],
			  data: ['1月', '2月', '3月', '4月', '5月', '6月'],
		      axisLine: {
		        lineStyle: {
		          color: 'rgba(255,255,255,.1)',
		          width: 2
		        },
		      },
		      axisTick: {
		        show: false
		      },
		      axisLabel: {
		        color: 'rgba(255,255,255,.5)',
		        fontSize:12
		      }
		    },
		    yAxis: {
		      axisLine: {
		        lineStyle: {
		          color: 'rgba(255,255,255,.1)',
		          width: 2
		        }
		      },
		      axisTick: {
		        show: false
		      },
		      axisLabel: {
		        color: 'rgba(255,255,255,0.6)',
		        fontSize:12
		      },
		      splitLine: {
		        lineStyle: {
		          color: 'rgba(255,255,255,.1)'
		        }
		      }
		    },
		    series: [
		      {
		        name: '倾斜辐射',
		        type: 'bar',
		        data: [10000, 10120, 14047, 12440, 11550,15220],
		        itemStyle: {
		          color: 'rgba(0, 216, 135, 0.4)',
		          barBorderRadius: 3
		        }
		      },
		      {
		        name: '直接辐射',
		        type: 'bar',
		        data: [14120, 12430, 14240, 17250, 17060,15220],
		        itemStyle: {
		          color: 'rgba(1, 132, 213, 0.5)',
		          barBorderRadius: 3
		        }
		      },
		      {
		        name: '总辐射',
		        type: 'bar',
		        data: [24120, 22550, 28287, 19690, 18610,30440],
		        itemStyle: {
		          color: 'rgba(85, 85, 127, 0.5)',
		          barBorderRadius: 3
		        }
		      }
		    ]
		  };
		  
		  myChart.setOption(option);
		  
		  window.addEventListener("resize", function () {
		    myChart.resize();
		  });
	}

})
	